//
//  MyView.m
//  XibTest
//
//  Created by 陈培 on 15/1/11.
//  Copyright (c) 2015年 pax. All rights reserved.
//

#import "MyView.h"

@implementation MyView
//http://www.tuicool.com/articles/ENv6Nf
//说明连接
- (id)initWithCoder:(NSCoder *)aDecoder
{
    self = [super initWithCoder:aDecoder];
    if (self != nil) {
        UIView * myView = [[[UINib nibWithNibName:@"MyView" bundle:nil] instantiateWithOwner:self options:nil] objectAtIndex:0];
        CGRect rect = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
        myView.frame = rect;
        _headerView.layer.cornerRadius = self.frame.size.width / 2 + 5;
        _headerView.layer.masksToBounds = YES;
        _nameLabel.layer.cornerRadius = _headerView.layer.cornerRadius / 10 * 3;
        _nameLabel.layer.masksToBounds = YES;
        [self addSubview:myView];
    }
    return self;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
